GBML manual / Motion

vsp

Vertical speed, in pixels per frame - positive is down.

Syntax

vsp: real

Description

Vertical speed, in pixels moved per frame - positive is down, negative is up, matching the room's own y-down convention. See hsp's own note for exactly how this interacts with speed/direction and gravity - the same rule applies to both axes at once, not independently.

Example

vsp = btn_dy() * 1.5;

The vertical half of a direct, angle-free 8-way walk - paired with hsp = btn_dx() * 1.5; this gives the usual top-down move-in-any-direction feel without ever touching speed/direction.

See also: hspspeeddirection